<!-- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -->
<%@ page contentType="text/html;charset=UTF-8"  language="java"%>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<c:set var="version" value="1.0.26" />
<c:set var="ctx" value="<%=request.getContextPath()%>" />
<c:set var="static_ctx" value="<%=request.getContextPath()%>" />

<script> var ctx = '${ctx}';</script>
<script> var static_ctx = '${static_ctx}';</script>
<script>
    //适配手机
    if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) { //移动端
        function dynamicLoadCss(url) {
            var head = document.getElementsByTagName('head')[0];
            var link = document.createElement('link');
            link.type = 'text/css';
            link.rel = 'stylesheet';
            link.href = url;
            head.appendChild(link);
        }

        dynamicLoadCss("${ctx }/css/commons-mobile.css?v=${version}");
    } else {
    }
</script>
<link href="${static_ctx}/bootstrap/css/bootstrap.min.css" rel="stylesheet">

<script>
    //导出显示
    var exportLimit = 35000;
    function exportTool(url, obj) {
        var lock = false;
        layer.confirm("<span style='text-align: center;display: block'>确定要导出数据？</span>", {}, function (index, layero) {
            if (!lock) {
                lock = true;
                axios.post(url, obj).then(function (res) {
                    if (!res.data.success) {
                        layer.msg(res.data.info);
                        return;
                    }
                    var count = res.data.data.count;
                    if (count > exportLimit) {
                        layer.msg("总数据条数:" + count + "，目前只支持导出 " + exportLimit + " 条数据");
                        return;
                    }
                    if (count <= 0) {
                        layer.msg("没有数据可导出");
                        return;
                    }
                    $("#submitForm").submit();
                    layer.msg("正在导出请稍等..");
                    layer.close(index);
                }).catch(function () {
                    layer.msg("网络异常", {icon: 5});
                })
            }
            layer.close(index);
        })
    }
</script>